package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallSpecificType;
import com.appkubes.mall.core.po.MallSpecificTypeExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallSpecificTypeMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_type
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSpecificTypeSqlProvider.class, method="countByExample")
    long countByExample(MallSpecificTypeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_type
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallSpecificTypeSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallSpecificTypeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_type
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_specific_type",
        "where specific_type_key = #{specificTypeKey,jdbcType=VARCHAR}"
    })
    int deleteByPrimaryKey(String specificTypeKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_type
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_specific_type (specific_type_key, app_key, ",
        "template_key, type_code, ",
        "plugin_ref, type_name, ",
        "metric, specific_index)",
        "values (#{specificTypeKey,jdbcType=VARCHAR}, #{appKey,jdbcType=VARCHAR}, ",
        "#{templateKey,jdbcType=VARCHAR}, #{typeCode,jdbcType=VARCHAR}, ",
        "#{pluginRef,jdbcType=VARCHAR}, #{typeName,jdbcType=VARCHAR}, ",
        "#{metric,jdbcType=VARCHAR}, #{specificIndex,jdbcType=INTEGER})"
    })
    int insert(MallSpecificType record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_type
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallSpecificTypeSqlProvider.class, method="insertSelective")
    int insertSelective(MallSpecificType record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_type
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSpecificTypeSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="specific_type_key", property="specificTypeKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="template_key", property="templateKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="type_code", property="typeCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="plugin_ref", property="pluginRef", jdbcType=JdbcType.VARCHAR),
        @Result(column="type_name", property="typeName", jdbcType=JdbcType.VARCHAR),
        @Result(column="metric", property="metric", jdbcType=JdbcType.VARCHAR),
        @Result(column="specific_index", property="specificIndex", jdbcType=JdbcType.INTEGER)
    })
    List<MallSpecificType> selectByExampleWithRowbounds(MallSpecificTypeExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_type
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallSpecificTypeSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="specific_type_key", property="specificTypeKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="template_key", property="templateKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="type_code", property="typeCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="plugin_ref", property="pluginRef", jdbcType=JdbcType.VARCHAR),
        @Result(column="type_name", property="typeName", jdbcType=JdbcType.VARCHAR),
        @Result(column="metric", property="metric", jdbcType=JdbcType.VARCHAR),
        @Result(column="specific_index", property="specificIndex", jdbcType=JdbcType.INTEGER)
    })
    List<MallSpecificType> selectByExample(MallSpecificTypeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_type
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "specific_type_key, app_key, template_key, type_code, plugin_ref, type_name, ",
        "metric, specific_index",
        "from mall_specific_type",
        "where specific_type_key = #{specificTypeKey,jdbcType=VARCHAR}"
    })
    @Results({
        @Result(column="specific_type_key", property="specificTypeKey", jdbcType=JdbcType.VARCHAR, id=true),
        @Result(column="app_key", property="appKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="template_key", property="templateKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="type_code", property="typeCode", jdbcType=JdbcType.VARCHAR),
        @Result(column="plugin_ref", property="pluginRef", jdbcType=JdbcType.VARCHAR),
        @Result(column="type_name", property="typeName", jdbcType=JdbcType.VARCHAR),
        @Result(column="metric", property="metric", jdbcType=JdbcType.VARCHAR),
        @Result(column="specific_index", property="specificIndex", jdbcType=JdbcType.INTEGER)
    })
    MallSpecificType selectByPrimaryKey(String specificTypeKey);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_type
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSpecificTypeSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallSpecificType record, @Param("example") MallSpecificTypeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_type
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSpecificTypeSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallSpecificType record, @Param("example") MallSpecificTypeExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_type
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallSpecificTypeSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallSpecificType record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_specific_type
     *
     * @mbg.generated
     */
    @Update({
        "update mall_specific_type",
        "set app_key = #{appKey,jdbcType=VARCHAR},",
          "template_key = #{templateKey,jdbcType=VARCHAR},",
          "type_code = #{typeCode,jdbcType=VARCHAR},",
          "plugin_ref = #{pluginRef,jdbcType=VARCHAR},",
          "type_name = #{typeName,jdbcType=VARCHAR},",
          "metric = #{metric,jdbcType=VARCHAR},",
          "specific_index = #{specificIndex,jdbcType=INTEGER}",
        "where specific_type_key = #{specificTypeKey,jdbcType=VARCHAR}"
    })
    int updateByPrimaryKey(MallSpecificType record);
}